﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ReligionsInLocalitiesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.ReligionsInLocalitiesAdmin" %>
<owc:OwGrid ID="ReligionsInLocalitiesGrid" runat="server" DataSourceID="ReligionsInLocalitiesOds"
    SkinID="OwGridAdmin" AutoGenerateColumns="False" OwEnableMessageDisplay="True"
    OwMessageDisplayType="InPlace" CellSpacing="0" GridLines="None">
    <MasterTableView DataSourceID="ReligionsInLocalitiesOds" DataKeyNames="ReligionsInLocalitiesID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn runat="server" HeaderText="<%$OwR:Code %>" DataField="ReligionsInLocalitiesID" />
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:ContinentLocality %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ContinentID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:CountryLocality %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("CountryID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:ProvinceLocality %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("ProvinceID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:DistrictLocality %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("DistrictID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:WardLocality %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("WardID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridBoundColumn DataField="Members" FilterControlAltText="Filter column column"
                HeaderText="<%$OwR:Members %>" UniqueName="column">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/ReligionsInLocalitiesEdit.aspx?Id=<%#Eval("ReligionID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("ReligionsInLocalitiesEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="ReligionsInLocalitiesOds" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwReligionsInLocalitiesBLL"
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwReligionsInLocalitiesEntity" DeleteMethod="OwDelete"
    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="religionID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
